package com.cheng;

import com.cheng.annotation.ExcelReader;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import javax.validation.Validator;

@SpringBootApplication
public class EasyExcelApplication {

    public static void main(String[] args) {
        SpringApplication.run(EasyExcelApplication.class, args);
    }

    /**
     * Excel 读取工具
     *
     * @param validator the validator
     * @return the excel reader
     */
    @Bean
    public ExcelReader excelReader(Validator validator) {
        return new ExcelReader(validator);
    }
}
